export default {
  /**
   * 请求localStotage的数据
   * */
  setSideNav ({ commit }, res) {
    let obj = {}
    obj[res.timestamp] = {
      menu: res.menu,
      submenu: res.submenu
    }
    localStorage.setItem('sideNav', JSON.stringify(obj))
    commit('SET_SIDE_NAV', res)
  },
  /**
   * 判断屏幕宽度
   * */
  setMediaScreen ({ commit }, screenObject) {
    commit('SET_MEDIA_SCREEN', screenObject)
  },

  /**
   * 平台消息未读总数量
   * */
  setUnreadCount ({ commit }, messageUnreadCount) {
    commit('SET_UNREADCOUNT', messageUnreadCount)
  },
  /**
   * 平台消息未读数量（分类）
   * */
  setMessageUnreadCount ({ commit }, messageUnreadCount) {
    commit('SET_MESSAGE_UNREADCOUNT', messageUnreadCount)
  },
  /**
   * 当前是否平台
   * */
  setIsPlatform ({ commit }, isPlatform) {
    commit('SET_IS_PLATFORM', isPlatform)
  }
}
